#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/types.h>

static struct platform_device my_device = 
{
	.name = "platform_demo",
	.id = 0,
};

static int __init platform_dummy_init(void)
{
	pr_info("Register dummy platform device\n");

	platform_device_register(&my_device);
	return 0;
}

static void __init platform_dummy_exit(void)
{
	pr_info("dummy platform device removed\n");
}

module_init(platform_dummy_init);
module_exit(platform_dummy_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Meng");
MODULE_DESCRIPTION("My platform demo module");